import React, { Component } from 'react';
import autoBind from 'react-autobind';
import Tabs from 'antd/lib/tabs';
import 'antd/lib/tabs/style/index.css';

// style
import styles from './index.css';
import IconfontStyle from '../../../../assets/iconfont/iconfont.css';

// widget 
import CategoryGoodsItem from './CategoryGoodsItem';

class CategoryGoods extends Component {
	constructor(props) {
      super(props)
      autoBind(this)
  }
	render() {
    const { meyley } = this.props
    
	 	return (
        <div className={`${styles['category-goods-wrap']} category-goods-wrap`}>
          <div className={styles['category-goods-left-mask']}>
          </div>
          <Tabs defaultActiveKey="0" tabPosition="left" >
              { 
                meyley.category && meyley.category.map((cate, ii) => {
                  return <Tabs.TabPane tab={cate.catName} key={ii}>
                        <CategoryGoodsItem info={cate} {...this.props}/>
                      </Tabs.TabPane>
                })
              }
          </Tabs>
        </div>
	  	);
	}
};

CategoryGoods.propTypes = {
};

export default CategoryGoods
